package edu.sctu.xiangkun.day201506.day20150609;

import java.text.DateFormat;
import java.util.Calendar;

/**
 * Created by user21 on 2015/6/9.
 */
public class CalendarDemo {
    Calendar calendar = Calendar.getInstance();
    DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
    public void setDateAndTime(){
        calendar.set(2015,6-1,11,9,30,10);
        calendar.add(calendar.MINUTE,2);
        calendar.getTime();
        System.out.println("时间 ："+dateFormat.format( calendar.getTime()));
    }

    public static void main(String[] args) {
        CalendarDemo calendarDemo = new CalendarDemo();
        calendarDemo.setDateAndTime();
    }
}
